FROM java:8-jre
LABEL Description="使用mycat做mysql数据库的读写分离"
ENV MYCAT_VERSION Mycat-server-1.6.5-release-20171117203123-linux.tar.gz
USER root
COPY ./$MYCAT_VERSION /
RUN tar -zxf /$MYCAT_VERSION
ENV MYCAT_HOME=/mycat
ENV PATH=$PATH:$MYCAT_HOME/bin
WORKDIR $MYCAT_HOME/bin
RUN chmod u+x ./mycat
EXPOSE 8066 9066
CMD ["./mycat","console"]